package hhm.android.base.activity

import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
import hhm.android.library.LogUtils

class BaseActivityLifeCycle : LifecycleObserver {
    private val tag =  BaseActivityLifeCycle::class.simpleName

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
     fun onCreate(){
        LogUtils.Companion.e(tag, "onCreate");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
     fun onStart(){
        LogUtils.Companion.e(tag, "onStart");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
     fun onResume(){
        LogUtils.Companion.e(tag, "onResume");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
     fun onPause(){
        LogUtils.Companion.e(tag, "onPause");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
     fun onStop(){
        LogUtils.Companion.e(tag, "onStop");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
     fun onDestroy(){
        LogUtils.Companion.e(tag, "onDestory");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_ANY)
     fun onAny(){
        LogUtils.Companion.e(tag, "onAny");
    }


}